home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / util3 / util3.arc / SETUP.DOC < prev    next >
Encoding:
Text File  |  1988-10-27  |  7.5 KB  |  152 lines

  1.           SETUP                                     Jeff Prosise
  2.           Command                                         No. 27
  3.  
  4.           ______________________________________________________
  5.  
  6.           Purpose:  Permits menu-oriented selection and immediate
  7.                     transmission of printer control codes from
  8.                     within a running application program.
  9.  
  10.           Format:   SETUP            (loads command into memory)
  11.                     <Ctrl-Right Shift>          (activates menu)
  12.                     <[Shift]<Fx>      (selects [deselects] mode)
  13.                     <Esc>            (activates selection(s) and
  14.                                  returns to application program)
  15.  
  16.                     Fx is a Function key (F1 through F10) that
  17.                     sends the required control sequence to the
  18.                     printer.  Shift-Fx toggles the selected
  19.                     printer mode off.
  20.  
  21.           Remarks:  After loading SETUP (normally via your
  22.                     AUTOEXEC.BAT file), the printer mode
  23.                     selection menu program is displayed by
  24.                     pressing the Ctrl-Right Shift key
  25.                     combination.  This can be done from within
  26.                     application programs that do not take over
  27.                     the keyboard interrupts; the application is
  28.                     simply suspended until you leave SETUP by
  29.                     pressing the Esc key.  (Application programs
  30.                     such as XyWrite III that do take over the
  31.                     keyboard interrupts can be used with
  32.                     SETUP.COM if they themselves provide the
  33.                     option of temporarily returning to DOS
  34.                     control.)
  35.  
  36.                     Printer permitting, more than one mode can be
  37.                     selected at once by pressing additional
  38.                     function keys.  The default printer choices
  39.                     are for the Epson RX/FX series.  Option 1
  40.                     shows how to modify the program for other
  41.                     printers.
  42.  
  43.                     Notes:
  44.  
  45.                     1.   SETUP.COM is a memory-resident program
  46.                          (approximately 3K in length), and so is
  47.                          subject to conflicts with other memory-
  48.                          resident software.  Several users have
  49.                          reported that it is incompatible with
  50.                          Prokey, for example.  Similarly, while
  51.                          SETUP.COM is compatible with SideKick,
  52.                          the combination of SuperKey and SideKick
  53.                          has been reported to be incompatible.
  54.  
  55.           Option 1: If you have access to an IBM or Microsoft
  56.                     macro assembler, the easiest way to modify
  57.                     SETUP for other printers (or to use LPT2: or
  58.                     LPT3: instead of LPT1:) is to call up the
  59.                     SETUP.ASM file (included with these
  60.                     utilities) in any ASCII word processor.  You
  61.                     can then make your modifications and
  62.                     reassemble the file.
  63.  
  64.                     Even if you do not have a macro assembler and
  65.                     must therefore use DEBUG.COM to modify
  66.                     SETUP.COM directly, print out and read the
  67.                     SETUP.ASM file.  It is heavily commented, and
  68.                     will give you a good idea of how the
  69.                     different menu strings and printer control
  70.                     strings are organized.  Note, however, that
  71.                     the specific values shown in SETUP.ASM are in
  72.                     decimal notation; values entered via DEBUG
  73.                     must be in hexadecimal notation.
  74.  
  75.                     The following offset addresses, not those
  76.                     originally published in PC Magazine, should
  77.                     be used:
  78.  
  79.                     The menu color attributes (4F and 70) are at
  80.                     offsets xxxx:013F and xxxx:0140.
  81.  
  82.                     To change the port number from LPT1: to LPT2:
  83.                     (or LPT3:) change the default 00 at xxxx:0C7A
  84.                     and at xxxx:0C84 to 01 (or 02).
  85.  
  86.                     The start of the menu text table (532 bytes,
  87.                     beginning with C9) is at offset xxxx:0151.
  88.                     The "P" in PRINTER SETUP MENU" is at
  89.                     xxxx:0172.
  90.  
  91.                     The printer control strings themselves begin
  92.                     at xxxx:09A1.  Each function key (and each
  93.                     shifted function key, with the exception of
  94.                     F19 and F20) can be assigned a string up to
  95.                     16 bytes long.  Each string must include a
  96.                     delimiter of FF (255 decimal) that marks the
  97.                     end of the string.  The beginning of the
  98.                     string for each successive function key
  99.                     starts at an address that is a multiple of 16
  100.                     bytes above the base address (xxxx:09A1) of
  101.                     the table.  You must pad the strings with
  102.                     zeros for any locations that are not used by
  103.                     actual control codes, so that each string
  104.                     begins on a 16-byte boundary.
  105.  
  106.                     You may modify the "trigger" keys as follows
  107.                     by using DEBUG and patching locations AD9 and
  108.                     ADB with these bytes:
  109.                     03 = Left Shift-Right Shift
  110.                     05 = Ctrl-Right Shift
  111.                     06 = Ctrl-Left Shift
  112.                     09 = Alt-Right Shift
  113.                     0A = Alt-Left Shift
  114.                     0C = Alt-Ctrl
  115.                     NOTE: Be sure to patch BOTH locations!
  116.  
  117.           In  order  to fully modify SETUP.COM to use with  your 
  118.           particular  printer  or set of printer codes  a  batch 
  119.           file has been supplied as well as a .SCR file so  that 
  120.           modification of SETUP is relatively easy.   Suppose we 
  121.           wanted to make a new setup for a color printer.  The 
  122.           syntax would be:
  123.  
  124.           SETUPMOD  CSETUP    
  125.  
  126.           (NOTE CSETUP is the replaceable parameter.   It  could 
  127.           have been called any legal DOS filespec!)
  128.  
  129.           SETUPMOD.BAT  will  copy SETUPORG.COM  (the  original, 
  130.           unmodified  version)  to CSETUP.COM  (the  replaceable 
  131.           parameter "CSETUP") as well as copying SETUPORG.SCR to 
  132.           "CSETUP.SCR".
  133.  
  134.           You  will  then be dropped into EDLIN (change the  BAT 
  135.           file  to  call  up  your  favorite  editor)  to   edit 
  136.           CSETUP.SCR  and change it as needed.   The SCR file is 
  137.           setup to mirror the original SETUP.COM file
  138.  
  139.           After  you  exit the editor,  CSETUP (or whatever  you 
  140.           choose  to call the new SETUP) will run through  DEBUG 
  141.           with the input file being CSETUP.SCR (the one you just 
  142.           modified).  Run the new program and test it so it does 
  143.           what you expected.   If not,  you will want to  simply 
  144.           edit CSETUP.SCR, save it and then run the command:
  145.  
  146.           DEBUG CSETUP.COM < CSETUP.SCR
  147.  
  148.           This  will  run corrections to the CSETUP  file.   You 
  149.           must  reboot your machine and reload the  program  for 
  150.           the new changes to have effect.
  151.  
  152.